package com.example.expresscabinet.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.expresscabinet.model.user;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface userMapper extends BaseMapper<user> {

    @Select("select * "+
            "from user "+
            "where (task in (select min(task) from user where company=#{company}))")
    List<user> getFixExpressman(@Param("company") String company);
}
